#include <stdio.h>
#include <conio.h>
int main()
{
    int i,x,n,a[40],j;
    // Nhap day ban dau
    printf ("amout of number");
    scanf ("%d",&n);
    for (i=0;i<n;i++)
    {
    printf ("a[%d]",i+1);
    scanf ("%d",&a[i]);
    }
    printf ("day ban dau la:");
    for (i=0;i<n;i++)
    {
    printf ("%d",a[i]);
   
    }
    // linear search
    printf ("\n input x");
    scanf ("%d",&x);
     i=1;
  while( (i<=n)&&a[i]!=x)
  i++;
    if (i<=n)
    printf ("%d o vi tri a[%d]",x,a[i]);
    else
    printf ("%d ko o trong day so",x);
    getch();
}
          
